package com.ht.medicaltreatment.adapter

import android.widget.CheckBox
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.ht.medicaltreatment.R
import com.ht.medicaltreatment.bean.CentrifugeSampleListBean

class SampleReturnAdapetr:BaseQuickAdapter<CentrifugeSampleListBean,BaseViewHolder>(R.layout.item_sample_add_layout) {
    override fun convert(holder: BaseViewHolder, item: CentrifugeSampleListBean) {
        holder.setText(R.id.tvCode,"${getItemPosition(item)+1}")
        holder.setText(R.id.tvName,item.name)
        holder.setText(R.id.tvProjectName,item.project.protocolNumber)
        val cb = holder.getView<CheckBox>(R.id.cbAll)
        cb.isChecked = item.isCheck
    }
}
